#!/bin/bash
# https://www.jianshu.com/p/9af6cd6901b9

echo -e "\n\ncurl with get"
curl http://lovivid.com/lzk/test.php?s=123&k=321
sleep 1

echo -e "\n\ncurl with post"
curl -d "s=123&k=321" http://lovivid.com/lzk/test.php
sleep 1

echo -e "\n\ncurl and save respose"
curl -o curlRsp http://lovivid.com/lzk/test.php?s=123&k=321 
sleep 1
echo -e "\n\nsee respose"
cat curlRsp

echo -e "\n\ncurl and rewrite respose"
curl http://lovivid.com/lzk/test.php?s=123&k=321 > curlRsp
sleep 1
echo -e "\n\nsee respose"
cat curlRsp
